<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class GmEmailexa extends Validate
{
    protected $rule = ['sendtype' => 'require|number','title' => 'require','content' => 'require','cmdtxt' => 'require','exatime' => 'require','touser' => 'require',
    ];

    protected $message = ['sendtype.require' => '发送类型 1.单用户发送 2.单服发送 3.多服发送为必填项','sendtype.number' => '发送类型 1.单用户发送 2.单服发送 3.多服发送需为数字','title.require' => '标题为必填项','content.require' => '内容为必填项','cmdtxt.require' => '命令文本为必填项','exatime.require' => '申请时间为必填项','touser.require' => '发送给谁为必填项',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['sendtype','title','content','cmdtxt','exatime','touser',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['sendtype','title','content','cmdtxt','exatime','touser',]);
    }
}
